include(default)
{% set osname = platform.system() | lower %}
{% set arch = {"AMD64": "x86_64"}.get(platform.machine(), platform.machine()) %}
{% if platform.system() == "Windows" %}
{% set exe_suffix = ".cmd" %}
{% endif %}
android_ndk={{ os.getenv("ANDROID_NDK") }}
target_host=armv7a-linux-androideabi
api_level=16
[settings]
arch=armv7
build_type=Release
compiler=clang
compiler.libcxx=c++_static
#compiler.libcxx=c++_shared
compiler.version=8
os=Android
os.api_level=$api_level
#[tool_requires]
[options]
{% if platform.system() == "Windows" %}
boost:addr2line_location=$android_ndk\toolchains\llvm\prebuilt\windows-x86_64\bin\x86_64-linux-android-addr2line.exe
{% endif %}
boost:without_stacktrace=True
[env]
{% set bin_path = "$android_ndk/toolchains/llvm/prebuilt/"~osname~"-"~arch~"/bin" %}
{% if platform.system() == "Windows" %}
PATH=[{{ bin_path | replace("/","\\") }}]
{% else %}
PATH=[{{ bin_path }}]
{% endif %}
CHOST=$target_host
AR=arm-linux-androideabi-ar
AS=arm-linux-androideabi-as
RANLIB=arm-linux-androideabi-ranlib
CC=$target_host$api_level-clang{{ exe_suffix }}
CXX=$target_host$api_level-clang++{{ exe_suffix }}
LD=arm-linux-androideabi-ld
STRIP=arm-linux-androideabi-strip
{% set toolchain = "$android_ndk/build/cmake/android.toolchain.cmake" %}
{% if platform.system() == "Windows" %}
CONAN_CMAKE_TOOLCHAIN_FILE={{ toolchain | replace("/","\\") }}
{% else %}
CONAN_CMAKE_TOOLCHAIN_FILE={{ toolchain }}
{% endif %}
CONAN_CMAKE_GENERATOR="Unix Makefiles"
[conf]
tools.android:ndk_path=$android_ndk

